Repository navigation
feat(options): add option to disable the Server-Timing header - #921
Open
arjun-rajappa wants to merge 2 commits into
Open
arjun-rajappa wants to merge 2 commits into
arjun-rajappa wants to merge 2 commits into
Conversation
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
CagriYonca
requested changes
Nov 9, 2026
CagriYonca
left a comment
Contributor
There was a problem hiding this comment.
I left a couple of comments. What do you think?
pvital
approved these changes
Nov 10, 2026
pvital
left a comment
Member
There was a problem hiding this comment.
Overall, it looks good to me - just a few comments based on @CagriYonca's review.
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
Contributor
Author
|
Addressed all review comments: type hints, import ordering, test YAML fixtures plus tests for them, caplog assertion and test names. Kept the is_server_timing_disabled() placement as discussed with @pvital. @CagriYonca could you take another look? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Some users do not want the Instana
Server-Timingheader (intid;desc=<trace id>) added to their responses and outgoing requests. This adds a documented switch to turn it off, following the same configuration precedence as the other tracing options.What
disable_server_timingtoBaseOptions(defaultFalse). Precedence:INSTANA_TRACING_DISABLE_SERVER_TIMING>INSTANA_CONFIG_PATHYAML (tracing.global.disable-server-timing) > agent config > default. The agent config is applied inStandardOptions._apply_agent_disable_server_timing().get_disable_server_timing_from_yaml()inutil/config.py. It supports the deprecatedcom.instana.tracingroot and tolerates an emptytracing:section.BasePropagator.is_server_timing_disabled(). It reads the flag on every call, so runtime agent-config changes are honoured. It falls back to enabled and logs at debug level if the agent is unavailable.HTTPPropagator,TextPropagator,BinaryPropagatorandlambda_inst.pyskip the header when the flag is set. The Lambda status-code handling is unchanged. The header logic moved into anadd_server_timing_header()helper.TextPropagatorandBinaryPropagator, build the headers once and write them per carrier type, instead of repeatingif server_timing:in every branch. Injected headers and their order are unchanged.is_server_timing_disabled().tests/instrumentation/aws/test_lambda_inst.pywith a mocked agent.